// JavaScript Document

function btn_click()
{
	
	var sql="select * from account where id='$uid$' ";
	sql=sql.replace("$uid$",$("#txtUid").val());
//	sql=sql.replace("$pwd$",$("#txtPassword").val());
	var orm=new atiOrmV4();
		orm.obj=sql ;
	orm.callbackFun=function(data)
	{
		
			try{
			  processJavaEx_V2q315(data);
		   }catch(e)
		   {
			 
				 
				  showErr(e);
				  return;
		  
		   }
		   var json=str2json(data);
		   if(json.length==0)
		   {
		   		alert("没有此用户id");
				return;
		   }
		   var obj=json[0];
		   var fm=new AForm()
		   fm.bind(obj);
		   
		   
		   
		   	
		   
	};
	orm.query();
	
}

//set click
function    setSubAgent()
{ 

   if( $("#tel").val()=='' ||    $("#bankcard").val()==''  ||    $("#sid").val()==''  )
{
	alert("信息不能为空");
	reutrn;
	
}

	if(! confirm(cfm_msg))
			return;
	  var code="new(com.attilax.user.AgentService).setSubHiagt4adm($uid$)";
	code=code.replace("$uid$",$("#txtUid").val());
//	code=code.replace("$pwd$",$("#txtPassword").val());
	   var jsb=new AtiJsBridge();
	
		jsb.exe("$code="+encodeURIComponent(code),function(data){
			console.log(data);
			 try{
			  processJavaEx_V2q315(data);
		   }catch(e)
		   {
			 
				if(catchEx(e,"com.attilax.secury.LoginException"))
				  {
					 
							alert("用户名密码错误");
							return;
						//
				  }
				  showErr(e);
				  return;
		  
		   }
		   alert("  ok");
		 //  window.location="../uc/uc.htm";
		});

	
}